(defun make-env-lisp2li(largs)
  (labels ((aux (l n )
		(if(null l )
		    l
		  (cons (cons (car l )  n )
			(aux (cdr l) (+  n 1 ))))))
	  (aux largs 1)))

(defun map-lisp-to-li (e env)
  (if (atom e)
      nil
    (append (lisp-to-li(car e) env)
	    (map-lisp-to-li(cdr e) env))))


(defun lisp-to-li (expr env)
  (cond ((and (atom expr)
	      (constantp expr));constantes
	 `(:const ,expr))
	(( or ( atom expr)
	      (symbolp expr))
	 `(:var ,expr))
	((and (eq 'if (car expr))
	      (eq 3 (length expr)))
	 `(:if ,@(map-lisp-to-li (cadr expr) env) ,@(map-lisp-to-li (caddr expr) env) ,@(map-lisp-to-li (cadddr expr) env)))
	((fboundp (car expr))
	 `(:call ,@(map-lisp-to-li (cdr expr) env)))))

